package com.agent.platform.task;

import com.agent.platform.service.TaskService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class TaskRetryTask {
    
    private final TaskService taskService;
    
    @Scheduled(fixedRate = 120000)
    public void retryPendingTasks() {
        log.debug("执行待处理任务重试");
        taskService.retryPendingTasks();
    }
}
